<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'findpwd.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script src="jquery/js/jquery-1.8.2.js"></script>
	<script src="jquery/js/jquery-ui-1.8.23.custom.js"></script>

		<link rel="stylesheet"
			href="jquery/css/ui-lightness/jquery-ui-1.9.0.custom.css" />
		<link rel="stylesheet" type="text/css"
			href="/webbei/js/bgjs/css/index.css" />
		<link rel="stylesheet" type="text/css" href="css/custom.css" />
		<link rel="stylesheet" type="text/css" href="css/login.css" />


		<link rel="Stylesheet" type="text/css" href="inc/wColorPicker.css" />
		<script type="text/javascript" src="inc/wColorPicker.js"></script>
		<script type="text/javascript" src="js/login.js"></script>
		<script type="text/javascript" src="js/bgjs/js/script.js"></script>
		
		<link href="css/login.css" type="text/css" rel="stylesheet" />
	<script>
			function sendmail(){
				var value=$("#email1").val();
				alert(value)
				if(value==""||value==null){
					alert("邮箱不能为空");
				}else{
					$.post("checkMailAction",{"email":value},function(data){
						if(data=="success"){
							$.post("SendMsgToEmailAction",{"email":value},function(data){
							            alert(data);
										if(data=="success"){
											alert("快去邮箱激活账号吧");
										}else{
											alert("发送邮箱失败");
										}
							});
						}else{
							alert("该邮箱不存在");
						}
				});
				}
				
			}
	</script>
  </head>
  
  <body style="width: 105%;margin-left:-20px;">
  <jsp:include page="top.jsp"></jsp:include>
 		 <div align="center" style="margin-top: 40px;height: 480px;">
 		    
	  		输入邮箱：<input type="text" name="email" id="email1">
	  		<input type="button" value="提交" onclick="sendmail()">
    	</div>
    	<jsp:include page="bottom.jsp"></jsp:include>
  </body>
</html>
